#!/bin/sh

NGX_PATH="/usr/local/openresty/nginx/sbin"

ps -ef |grep nginx |grep -v grep
if [ $? -ne 0 ]; then
    sudo ${NGX_PATH}/nginx -p `pwd` -c conf/nginx.conf
    echo "nginx start"
else
    sudo ${NGX_PATH}/nginx -p `pwd` -c conf/nginx.conf -s reload
    echo "nginx reload"
fi
